package cn.edu.tju.se.records.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.codehaus.jackson.map.annotate.JsonDeserialize;
import org.codehaus.jackson.map.annotate.JsonSerialize;

import cn.edu.tju.se.base.service.JsonDateDeserializer;
import cn.edu.tju.se.base.service.JsonDateSerializer;

@Entity
@Table(name = "patient")
public class Patient {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    protected int id;
    
    protected String doctorid;
    
    protected String patientid;
    
    protected String patientname;
    
    protected String clinicalcondition;
    
    protected String treatcondition;
    
    protected Date treatdate;
    
    protected Date patientbithday;
    
    protected String patientgender;
    
    protected String remark;

	public String getCoverphoto() {
		return coverphoto;
	}

	public void setCoverphoto(String coverphoto) {
		this.coverphoto = coverphoto;
	}

	protected String coverphoto;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getDoctorid() {
		return doctorid;
	}

	public void setDoctorid(String doctorid) {
		this.doctorid = doctorid;
	}

	public String getPatientid() {
		return patientid;
	}

	public void setPatientid(String patientid) {
		this.patientid = patientid;
	}

	public String getPatientname() {
		return patientname;
	}

	public void setPatientname(String patientname) {
		this.patientname = patientname;
	}

	public String getClinicalcondition() {
		return clinicalcondition;
	}

	public void setClinicalcondition(String clinicalcondition) {
		this.clinicalcondition = clinicalcondition;
	}

	public String getTreatcondition() {
		return treatcondition;
	}

	public void setTreatcondition(String treatcondition) {
		this.treatcondition = treatcondition;
	}

	@JsonSerialize(using=JsonDateSerializer.class) 
	public Date getTreatdate() {
		return treatdate;
	}
	
	public void setTreatdate(Date treatdate) {
		this.treatdate = treatdate;
	}

	@JsonSerialize(using=JsonDateSerializer.class) 
	public Date getPatientbithday() {
		return patientbithday;
	}

	public void setPatientbithday(Date patientbithday) {
		this.patientbithday = patientbithday;
	}

	public String getPatientgender() {
		return patientgender;
	}

	public void setPatientgender(String patientgender) {
		this.patientgender = patientgender;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
}
